Add throwable turtle shell and NPC racing opponents#1
Open
Makio64 wants to merge 1 commit intomrdoob:masterfrom
Open
Add throwable turtle shell and NPC racing opponents#1Makio64 wants to merge 1 commit intomrdoob:masterfrom
Makio64 wants to merge 1 commit intomrdoob:masterfrom
Conversation
- Press Space (or gamepad A) to throw a bouncy turtle shell projectile that ricochets off walls and knocks trucks into a spin - Convert the three static NPC trucks into kinematic waypoint-following racers looping around the outer track - Shell hit spins target ~22 rad/s for 2.2 s with vertical hop and tilt wobble; ricochet also stuns the player - Hit burst effect: expanding yellow ring plus pooled gold stars with gravity Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 tasks
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Files
js/Shell.js(new) — projectile class: small dynamic sphere,gravityFactor: 0, speed-clamped after each bounce, 6 s lifetime, 150 ms owner-ignore window. Turtle-carapace visual built from a flattened dome + hex bumps + rim + belly.js/NPC.js(new) —NPCclass with a kinematic box body inOL_MOVING, outer-loop waypoint list, smooth heading lerp, spin/hop/tilt hit state.js/HitFX.js(new) — pooled ring + star burst effect.js/Vehicle.js—stun()method + stun-state branch inupdate(): locks input, spins the container, hops + tilts the body node.js/Controls.js— rising-edge fire input on Space / gamepad button 0, returned asinput.fire.js/Track.js— exportNPC_TRUCKS, drop the inline static-clone loop (ownership moved toNPC.jsdriven frommain.js).js/main.js— wire everything:createNPCs,HitFX, shell pool, rewritten contact listener that dispatches to shells and triggers the appropriate stun/hit/burst. Bodies are destroyed outside the contact callback to avoid re-entrancy issues.Test plan
python3 -m http.server) and openindex.html.scene.childrenstabilises.🤖 Generated with Claude Code